//
//  UIView+MZLayout.h
//  MZAnimationDemo
//
//  Created by Chris Yang on 2016/11/24.
//  Copyright © 2016年 Chris Yang. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface UIView(MZLayout)

#pragma mark - Get X

- (CGFloat)mzGetXForSubviewToLeftWithSpace:(CGFloat)space;
- (CGFloat)mzGetXForSubviewToRightWithSpace:(CGFloat)space viewWidth:(CGFloat)viewWidth;
- (CGFloat)mzGetXForSubviewInCentenWithOffset:(CGFloat)offset viewWidth:(CGFloat)viewWidth;

- (CGFloat)mzGetXForBrotherViewToLeftWithSpace:(CGFloat)space;
- (CGFloat)mzGetXForBrotherViewToRightWithSpace:(CGFloat)space viewWidth:(CGFloat)viewWidth;
- (CGFloat)mzGetXForBrotherViewInCentenWithOffset:(CGFloat)offset viewWidth:(CGFloat)viewWidth;

#pragma mark - Get Y

- (CGFloat)mzGetYForSubviewToTopWithSpace:(CGFloat)space;
- (CGFloat)mzGetYForSubviewToBottomWithSpace:(CGFloat)space viewHeight:(CGFloat)viewHeight;
- (CGFloat)mzGetYForSubviewInCentenWithOffset:(CGFloat)offset viewHeight:(CGFloat)viewHeight;

- (CGFloat)mzGetYForBrotherViewToTopWithSpace:(CGFloat)space;
- (CGFloat)mzGetYForBrotherViewToBottomWithSpace:(CGFloat)space viewHeight:(CGFloat)viewHeight;
- (CGFloat)mzGetYForBrotherViewInCentenWithOffset:(CGFloat)offset viewHeight:(CGFloat)viewHeight;

#pragma mark - Rect Base

- (CGRect)mzRectInSubviewWithWidth:(CGFloat)width
                          height:(CGFloat)height
                          toLeft:(CGFloat)toLeft
                           toTop:(CGFloat)toTop;

- (CGRect)mzRectInSubviewWithWidth:(CGFloat)width
                          height:(CGFloat)height
                         toRight:(CGFloat)toRight
                           toTop:(CGFloat)toTop;

- (CGRect)mzRectInSubviewWithWidth:(CGFloat)width
                          height:(CGFloat)height
                          toLeft:(CGFloat)toLeft
                        toBottom:(CGFloat)toBottom;

- (CGRect)mzRectInSubviewWithWidth:(CGFloat)width
                          height:(CGFloat)height
                         toRight:(CGFloat)toRight
                        toBottom:(CGFloat)toBottom;

#pragma mark - Rect Center

- (CGRect)mzCenterRectInSubviewWithWidth:(CGFloat)width
                                height:(CGFloat)height;

- (CGRect)mzCenterRectInSubviewWithWidth:(CGFloat)width
                                height:(CGFloat)height
                               xOffset:(CGFloat)xOffset
                               yOffser:(CGFloat)yOffset;

- (CGRect)mzCenterRectInSubviewWithWidth:(CGFloat)width
                                height:(CGFloat)height
                                toLeft:(CGFloat)toLeft;

- (CGRect)mzCenterRectInSubviewWithWidth:(CGFloat)width
                                height:(CGFloat)height
                               toRight:(CGFloat)toRight;

- (CGRect)mzCenterRectInSubviewWithWidth:(CGFloat)width
                                height:(CGFloat)height
                                 toTop:(CGFloat)toTop;

- (CGRect)mzCenterRectInSubviewWithWidth:(CGFloat)width
                                height:(CGFloat)height
                              toBottom:(CGFloat)toBottom;

#pragma mark - Rect Center View-base

- (CGRect)mzCenterRectInSubviewWithView:(UIView *)childView;
- (CGRect)mzCenterRectInSubviewWithView:(UIView *)childView toLeft:(CGFloat)toLeft;
- (CGRect)mzCenterRectInSubviewWithView:(UIView *)childView toRight:(CGFloat)toRight;
- (CGRect)mzCenterRectInSubviewWithView:(UIView *)childView toTop:(CGFloat)toTop;
- (CGRect)mzCenterRectInSubviewWithView:(UIView *)childView toBottom:(CGFloat)toBottom;

@end
